<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./../template.xhtml">

            <ui:define name="title">
                Admin Registration
            </ui:define>

            <ui:define name="content">
                <h:form id="formx">

                    <p:panel id="panel" header="Admin Registration">
                        <p:focus context="panel"/>  
                        
                        <h:panelGrid columns="2">
                            <h:outputLabel for="Password" value="Password: *" />
                            <p:inputText id="Password" type="password" value="#{userController.selected.userPass}" label="Password" required="true">
                                <f:validateLength minimum="2" />
                            </p:inputText>

                            <h:outputLabel for="CPassword" value="Password Confim: *" />
                            <p:inputText id="CPassword" type="password" value="#{userController.newPassConfirm}" label="CPassword" required="true"
                                >
                                <f:validateLength minimum="2" />
                            </p:inputText>
                        </h:panelGrid>
                        <p:commandButton id="btnsave" value="Save" update="panel" action="#{userController.create}" ajax="false"/>
                        <p:commandButton id="btnCancel" value="Cancel" action="home"/>
                    </p:panel>

                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
